package com.huicoo.forestmanager.ui.patrol;

import android.app.Activity;
import android.content.Intent;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;

import com.huicoo.forestmanager.R;
import com.huicoo.forestmanager.base.BaseActivity;
import com.huicoo.forestmanager.ui.patrol.PatrolRecordFragment.PatrolRecordFragment;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 巡查记录
 */
public class PatrolRecordActivity extends BaseActivity {

    @BindView(R.id.frame_layout)
    FrameLayout frame_layout;

    @BindView(R.id.back_tv)
    TextView back_tv;


    @Override
    protected int getLayoutId() {
        return R.layout.activity_patrol_record;
    }

    @Override
    protected void initView() {
        PatrolRecordFragment instance = PatrolRecordFragment.getInstance();
        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        transaction.add(R.id.frame_layout,instance );
        transaction.show(instance).commitNowAllowingStateLoss();
    }

    public static void start(Activity activity) {
        Intent intent = new Intent(activity, PatrolRecordActivity.class);
        activity.startActivity(intent);
    }

    @OnClick({R.id.back_tv})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back_tv://报送
                finish();
                break;
        }
    }
}
